package com.bms.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bms.dao.InitDao;
import com.bms.service.InitService;

/**
 * @author Lan
 * @Company 上海全景数字技术有限公司
 */
@Service
public class InitServiceImpl implements InitService {

	private InitDao initDao;

	public InitDao getInitDao() {
		return initDao;
	}

	@Resource
	public void setInitDao(InitDao initDao) {
		this.initDao = initDao;
	}

	public void deleteTable() {
		initDao.delete("delete User");
		initDao.delete("delete AuditResult");
		initDao.delete("delete Role");
		initDao.delete("delete App");
		initDao.delete("delete FtpServer");

//		initDao.delete("delete AppFile");
//		initDao.delete("delete AppFileTemp");
//		initDao.delete("delete Log");
//		initDao.delete("delete SensitiveWord");
//		initDao.delete("delete VisitStatis");
	}

	public void deleteTable(String tblEntityName) {
		initDao.delete("delete " + tblEntityName);
	}
}
